package com.example.capsule_kafka.controller;


import com.example.capsule_kafka.service.FieldToMacService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author: zhuzhiming
 * @Date: 2022/5/1 23:29
 */
@RestController
@Slf4j
public class RoomController {

    @Autowired
    FieldToMacService fieldToMacService;

    @GetMapping("/getRoomList/{macAddress}")
    @CrossOrigin
    public String getRoomList(@PathVariable String macAddress) {
      return fieldToMacService.getFieldByMac(macAddress);
    }


}

